package com.fl.proyect_softmedic;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.example.proyect_softmedic.R;

public class CustomArrayAdapter<T> extends ArrayAdapter<T>
{
	

	
    public CustomArrayAdapter(Context ctx, T [] objects)
    {
        super(ctx, android.R.layout.simple_spinner_item, objects);
    }

    //other constructors

    @Override
    public View getDropDownView(int position, View convertView, ViewGroup parent)
    {
        View view = super.getView(position, convertView, parent);

        //we know that simple_spinner_item has android.R.id.text1 TextView:         

        // if(isDroidX) {
            TextView text = (TextView)view.findViewById(android.R.id.text1);            
            text.setTextColor(Color.BLACK);//choose your color :)  
            text.setPadding(30, 20, 3, 2);
            //text.setPadding(left, top, right, bottom);
            view.setBackgroundResource(R.drawable.bg_opt_spinner);
            
        //}

        return view;

    }
 
}
